package presentation.publicui;

import javax.swing.JFrame;

import po.userpo.Student;
import po.userpo.UserPO;
import presentation.CollegeTeacher.CollegeTeacherAddMenu;
import presentation.CourseTeacher.CourseTeacherAddMenu;
import presentation.Dean.DeanAddMenu;
import presentation.Student.StudentAddMenu;

public class PublicFrameAddMenu {
	JFrame frame;
	UserPO userPO;
	
	public PublicFrameAddMenu(UserPO po,JFrame jframe){
		frame = jframe;
		userPO = po;
	}
	
	
	public void addMenu(){
		System.out.println(userPO.getUserRole().toString());
		if(userPO.getUserRole().toString().equals("student")){
			StudentAddMenu addMenu = new StudentAddMenu();
			addMenu.addMenuListener(frame, (Student)userPO);
		}else if(userPO.getUserRole().toString().equals("dean")){
			DeanAddMenu addMenu = new DeanAddMenu();
			addMenu.addMenuListener(frame, userPO);
		}else if(userPO.getUserRole().toString().equals("courseTeacher")){
			CourseTeacherAddMenu addMenu = new CourseTeacherAddMenu();
			addMenu.addMenuListener(frame, userPO);
		}else if(userPO.getUserRole().toString().equals("collegeTeacher")){
			CollegeTeacherAddMenu addMenu = new CollegeTeacherAddMenu();
			addMenu.addMenuListener(frame, userPO);
		}
	}
	
	
}
